/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package MDP;

import CellWorld.CellWorld;
import CellWorld.CellWorldPosition;
import java.util.List;

/**
 * @author Ravi Mohan
 *
 */
public class MDPFactory {
    private static List<CellWorldPosition> estadoFinal;
    private static int i;
    private static int j;

        public static MDP createMDP() {

                CellWorld cw = new CellWorld(6, 8, -0.04);
                
                estadoFinal = cw.getFinalStates();
                
                cw.setTerminalState(estadoFinal.get(0));
                i = estadoFinal.get(0).getY();
                j = estadoFinal.get(0).getX();
                cw.setReward(i, j, 100);
                //cw = new CellWorld(3, 4, -0.04);

                //cw.markBlocked(2, 2);

                //cw.setTerminalState(2, 4);
                //cw.setReward(2, 4, -1);

                //cw.setTerminalState(3, 4);
                //cw.setReward(3, 4, 1);
                return cw.asMdp();
        }
}
